EntityDAC
Returns the last element of an enumeration, or a nil value if no element is found.
IObjectEnumerable<T>
function LastOrDefault: T;
Use the method to obtain the last element of an enumeration. If the enumeration contains no elements, the method returns nil.